<?php

class BuscarOrdenCirugia extends CI_Controller {
    
    function __construct() {
        parent::__construct();
    }
    
     public function buscar(){
        
         
        $buscar = $this->input->get('buscar');
        if (isset($buscar) && $buscar=='true'){
            $pars = $this->input->get(NULL, TRUE);
            
            $apePat = $this->input->get('Apellido_Paterno');
            $apeMat = $this->input->get('Apellido_Materno');
            $nombres = $this->input->get('Nombres');
            
            $this->load->model('Paciente_Model');
            $pacientes = $this->Paciente_Model->buscarPacientes($nombres, $apePat, $apeMat);
        }else{
            $pacientes = null;
        }
        
        $this->args['title'] = 'Pacientes';
        $this->args['content'] = 'paciente/buscar/index';
        $this->args['pacientes'] = $pacientes;
        
        $this->loadView();
    }
    
}
?>
